package br.uefs.ecomp.myBook.view;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;

import javax.swing.*;

import br.uefs.ecomp.myBook.model.GeneralFile;
import br.uefs.ecomp.myBook.model.GeneralUpload;
import br.uefs.ecomp.myBook.model.MyBookVisibility;

public class UploadPanelTest extends JFrame implements ActionListener{
	
	private UploadPanelTest() throws IOException{		
		add (new UploadPanel(this));
	}
	
	public static void main(String[] args) throws IOException{
		UploadPanelTest window = new UploadPanelTest();
		window.setVisible(true);
		window.revalidate();
		window.repaint();
		window.pack();
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		JOptionPane.showMessageDialog(this, "Apertado: "+((GeneralUpload)e.getSource()).getFile().getFileName());
	}
	
}
